const Router = require('koa-router')
const auth = require('../middleware/auth')
const { getMenuList, saveMenu, deleteMenu } = require('@/controller/menu')

const menuRouter = new Router({ prefix: '/menu' })

menuRouter.get('/list', auth, getMenuList) // 获取菜单列表
menuRouter.post('/save', auth, saveMenu) // 保存菜单
menuRouter.post('/delete', auth, deleteMenu)

module.exports = menuRouter